package com.itheima.api.object;

public class InterviewTest {
    public static void main(String[] args) {
        String s = "abc";
        StringBuilder sb = new StringBuilder("abc");

        //此时调用的是String类中的equals方法
        //保证参数也是字符串,String中会进行类型判断,不一致直接返回false
        System.out.println("s.equals(sb) = " + s.equals(sb));

        System.out.println("sb.equals(s) = " + sb.equals(s));
    }

}
